package com.icart.entities;

import javax.persistence.*;

@Entity
@Table(name = "bi_carkind", schema = "ams", catalog = "")
public class BiCarkindEntity {
    private long carkindid;
    private String carkindname;
    private Long chnid;
    private Integer isdefault;
    private Integer status;

    @Id
    @Column(name = "carkindid")
    public long getCarkindid() {
        return carkindid;
    }

    public void setCarkindid(long carkindid) {
        this.carkindid = carkindid;
    }

    @Basic
    @Column(name = "carkindname")
    public String getCarkindname() {
        return carkindname;
    }

    public void setCarkindname(String carkindname) {
        this.carkindname = carkindname;
    }

    @Basic
    @Column(name = "chnid")
    public Long getChnid() {
        return chnid;
    }

    public void setChnid(Long chnid) {
        this.chnid = chnid;
    }

    @Basic
    @Column(name = "isdefault")
    public Integer getIsdefault() {
        return isdefault;
    }

    public void setIsdefault(Integer isdefault) {
        this.isdefault = isdefault;
    }

    @Basic
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BiCarkindEntity that = (BiCarkindEntity) o;

        if (carkindid != that.carkindid) return false;
        if (carkindname != null ? !carkindname.equals(that.carkindname) : that.carkindname != null) return false;
        if (chnid != null ? !chnid.equals(that.chnid) : that.chnid != null) return false;
        if (isdefault != null ? !isdefault.equals(that.isdefault) : that.isdefault != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (carkindid ^ (carkindid >>> 32));
        result = 31 * result + (carkindname != null ? carkindname.hashCode() : 0);
        result = 31 * result + (chnid != null ? chnid.hashCode() : 0);
        result = 31 * result + (isdefault != null ? isdefault.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        return result;
    }
}
